package com.phiture.erp.basic.core.pojo.dto;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @author YH
 * @date 2025/4/2
 */

@Schema(description = "管理后台 - 物料计划资料分页 Request DTO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ErpMaterialPlanPageReqDTO extends PageParam {
    @Schema(description = "计划状态(0:未核准 1:核准 2:禁用 3:已删除)", example = "2")
    private Boolean status;

    @Schema(description = "禁用组织")
    private String freezeOrgUnit;

    @Schema(description = "物料", example = "12184")
    private Long materialId;

    @Schema(description = "物料属性( 10010:规划件 10020:虚拟件 10030:自制件 10040:外购件 10050:委外件 10060:其他)")
    private Integer materialAttr;

    @Schema(description = "制造策略( 10110:MTS10基于预测 10120:MTS11基于预测(只计算毛需求，不考虑库存) 10130:MTS20基于预测和订单)")
    private Integer planStrategy;

    @Schema(description = "物料特性(10410:主物料 10420:主辅料 10430:主参配料 0:)")
    private Integer materialChar;

    @Schema(description = "批量增量")
    private BigDecimal batchincQty;

    @Schema(description = "生产周期(天)")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Integer[] produceLeadTime;

    @Schema(description = "采购周期(天)")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Integer[] recevingLeadTime;

    @Schema(description = "责任部门", example = "27502")
    private Long dutyDepartmentId;

    @Schema(description = "是否倒冲")
    private Boolean isBackFlush;

    @Schema(description = "领送料模式(11010:生产领料 11030:看板 11050:直送 11040:不领料)")
    private Integer issMode;

    @Schema(description = "领料提前期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Integer[] issLeadTime;

    @Schema(description = "计划类型(0:人工订货 1:再订货点 2:MPS 3:MRP)")
    private Integer planningMode;

    @Schema(description = "关重件")
    private Boolean isKeyPart;

    @Schema(description = "质检组织", example = "30")
    private Long qualityOrgId;

    @Schema(description = "生产线", example = "12843")
    private Long productLineId;

    @Schema(description = "默认采购组织", example = "28800")
    private Long purOrgId;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;
}
